package com.arpa.wms.service;

import com.arpa.core.web.Result;
import com.arpa.wms.domain.dto.PutawayRegisterDTO;
import com.arpa.wms.domain.entity.Inbound;
import com.arpa.wms.domain.entity.PutawayItem;
import com.arpa.wms.domain.entity.PutawayRegister;
import com.arpa.wms.domain.vo.PutawayItemVO;
import com.arpa.wms.domain.vo.PutawayRegisterVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 上架确认 服务类
 * </p>
 *
 * @author LEO
 * @since 2020-08-04
 */
public interface IPutawayRegisterService extends IService<PutawayRegister> {

    /**
     * 保存
     * @param entity
     * @return
     */
    @Override
    boolean save(PutawayRegister entity);

    /**
     * 根据code更新实体
     * @param entity
     * @return
     */
    int updateByCode(PutawayRegister entity);

    /**
     * 查询列表
     * @param putawayRegisterDTO
     * @return
     */
    List<PutawayRegisterVO> queryList(PutawayRegisterDTO putawayRegisterDTO);

    /**
     * 查询合计,包含总数
     * @param putawayRegisterDTO
     * @return
     */
    PutawayRegisterVO queryListSum(PutawayRegisterDTO putawayRegisterDTO);

    /**
     * PDA 上架确认
     * @param putawayRegister
     * @return
     */
    Inbound confirm(PutawayRegister putawayRegister);

    /**
     * 托盘上架确认
     * @param putawayRegister
     * @return
     */
    Result palletConfirm(PutawayRegister putawayRegister);

    List<PutawayRegisterVO> queryListByCodes(List<String> codes);

    /**
     * 更新上架单的任务号
     * @param pValue
     * @param groupCode
     * @param taskCode
     * @return
     */
    boolean updateTaskCode(List<PutawayItem> pValue, String groupCode, String taskCode);

}
